<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    public function error($msg)
    {
        return ['code' => 1, 'msg' => $msg];
    }

    public function success($data, $msg)
    {
        return ['code' => 0, 'data' => $data, 'msg' => $msg];
    }
}
